home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 2
/
Atari Mega Archive CD - Volume 2.iso
/
8bit
/
cislib_b
/
pltchr.doc
< prev
next >
Wrap
Text File
|
1995-04-22
|
2KB
|
66 lines
PLTCHR
PLTCHR is a BASIC subroutine to put ATASCII text characters on a graphics
screen, even redefined characters. The size of the text characters will depend
on the graphics mode which has been set. Only horizontal text is supported.
IMPORTANT NOTES
1. PLTCHR is fully self-relocatable, so it may be moved anywhere in memory.
2. The graphics mode must have been set before PLTCHR is called. The
location of the upper left hand corner of the first text character may be set
with a BASIC "POSITION" statement. The row and column are automatically updated
as characters are placed on the screen.
3. An attempt to put characters outside of the visible screen will result in
an error.
4. Since PLTCHR uses the current character set, it will work with a
redefined character set.
5. An easy way to erase something is to output an inverse video blank in the
background color (which is black as a default).
CALLING
RETURNCODE=USR(PLTCHR, SADR, SLEN)
PLTCHR: The address of the PLTCHR subroutine [usually ADR(PLTCHRSTRING$)].
SADR: Address of the string containing the text to be placed on the screen
[usually ADR(DATASTRING$)].
SLEN: Total length of the text string [usually LEN(DATASTRING$)].
RETURN CODES
0 Normal completion.
1 Error in one of the arguments.
>1 Standard Atari I/O error code.
DEMONSTRATION
PLTCHR.BIN is a simple tokenized BASIC (binary) program which will
demonstrate the PLTCHR subroutine. As a first test, try "7" for the graphics
mode, "12,12" for the column,row, and "2" for the color code; then type any
short text string that you like. Experiment with the demo to learn how to use
the subroutine.
USE
To use the subroutine, just transfer the statements 900-905 to your own
program (you could do a LIST "D:TEMP",900,905 from the demo followed by an ENTER
"D:TEMP" into your own program); of course, you can renumber the statements as
necessary. Remember to call the subroutine once at the beginning of your program
to set it up.
-John Navas [72645,1070]